#include "ffd.h"

FFD::FFD(QWidget *parent, Qt::WFlags flags)
	: QMainWindow(parent, flags)
{
	ui.setupUi(this);

	initWidgets();
	initConnections();
	
}

FFD::~FFD()
{
}

void FFD::initWidgets()
{
	// dockWidget
	{
		controlPanel = new ControlPanel(this);
		ui.dockWidget->setWidget(controlPanel);
	}
	
	// centralWidget
	{
		QVBoxLayout * centralWidgetLayout = new QVBoxLayout(ui.centralWidget);

		render = new Render(ui.centralWidget);
		centralWidgetLayout->addWidget(render);
	}
}

void FFD::initConnections()
{
	// Menu Item
	{
		// File
		{
			connect(ui.actionOpen, SIGNAL(triggered()), this, SLOT(slotFileOpen()));
			connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(slotFileExit()));
		}
	}
}

void FFD::slotFileOpen()
{

}

void FFD::slotFileExit()
{
	this->close();
}
